<script type="text/javascript" src="<?php echo Yii::app()->baseUrl ?>/scripts/jquery/jquery.min.js"></script>
<script type="text/javascript" src="<?php echo Yii::app()->baseUrl ?>/scripts/js/product/index.js"></script>
<script type="text/javascript">
    $(document).ready(function(){
        var status = '<?php echo $pagevals['status']; ?>';
        $('#status').val(status);

        var hot_status = '<?php echo $pagevals['hot_status']; ?>';
        $('#hot_status').val(hot_status);

        var brand = '<?php echo $pagevals['brand']; ?>';
        $('#brand').val(brand);

        var size = '<?php echo $pagevals['size']; ?>';
        $('#size').val(size);

        var color = '<?php echo $pagevals['color']; ?>';
        $('#color').val(color);

        var category_id = '<?php echo $pagevals['category_id']; ?>';
        $('#category_id').val(category_id);
        
        $('#search_box').keyup(function(e){
            var search_string =  $('#search_box').val();
            action = "?r=product/index&status="+status+"&hot_status="+hot_status+"&search_string="+search_string+"&category_id="+category_id+"&color="+color+"&brand="+brand+"&size="+size;
            if(e.keyCode == 13){
              window.location = action;
            }
        });
        
        $("#status").change(function(){
            var filter_laber_status = $("#status").val();
            action = "?r=product/index&status="+filter_laber_status+"&hot_status="+hot_status+"&category_id="+category_id+"&color="+color+"&brand="+brand+"&size="+size;
            window.location = action;
         });

         $("#category_id").change(function(){
            var filter_laber_category_id = $("#category_id").val();
            action = "?r=product/index&status="+status+"&hot_status="+hot_status+"&category_id="+filter_laber_category_id+"&color="+color+"&brand="+brand+"&size="+size;
            window.location = action;
         });
         
         $("#hot_status").change(function(){
            var filter_laber_hot_status = $("#hot_status").val();
            action = "?r=product/index&status="+status+"&hot_status="+filter_laber_hot_status+"&category_id="+category_id+"&color="+color+"&brand="+brand+"&size="+size;
            window.location = action;
         });

        $("#brand").change(function(){
            var filter_laber_brand = $("#brand").val();
            action = "?r=product/index&status="+status+"&hot_status="+hot_status+"&category_id="+category_id+"&color="+color+"&brand="+filter_laber_brand+"&size="+size;
            window.location = action;
        });

        $("#size").change(function(){
            var filter_laber_size = $("#size").val();
            action = "?r=product/index&status="+status+"&hot_status="+hot_status+"&category_id="+category_id+"&color="+color+"&brand="+brand+"&size="+filter_laber_size;
            window.location = action;
        });

        $("#color").change(function(){
            var filter_laber_color = $("#color").val();
            action = "?r=product/index&status="+status+"&hot_status="+hot_status+"&category_id="+category_id+"&color="+filter_laber_color+"&brand="+brand+"&size="+size;
            window.location = action;
        });
       
    });
</script>

<div style="float: left;">
   <button class="btn create_new" href="?r=product/create"><span class="icon16 cut-icon-plus"></span> Add</button>
   <?php
        $btn_pending='<button class="btn pending_checked" style="margin-right: 3px" href="#"><span class="icon16 entypo-icon-time"></span> Pending</button>';
        $btn_approve='<button class="btn approve_checked" style="margin-right: 3px" href="#"><span class="icon16 icomoon-icon-checkmark"></span> Approve</button>';
        $btn_active='<button class="btn active_checked" style="margin-right: 3px" href="#"><span class="icon16 icomoon-icon-arrow-up-7"></span> Active</button>';
        $btn_block='<button class="btn block_checked" style="margin-right: 3px" href="#"><span class="icon16 icomoon-icon-blocked"></span> Block</button>';
        $btn_restore='<button class="btn restore_checked" style="margin-right: 3px" href="#"><span class="icon16 entypo-icon-back"></span> Restore</button>';
        $btn_remove='<button class="btn remove_checked" style="margin-right: 3px" href="#"><span class="icon16 icomoon-icon-remove-2"></span> Delete</button>';
        
         if($pagevals['status'] == 'pending'){
            //$post_active ='<a href="#" style="display:none;float:left" title="Active" id="'.$post['id'].'" class="active"><span class="icon12 icomoon-icon-arrow-up-7"></span></a>';
            $btn_block='<button class="btn block_checked" style="display:none" href="#"><span class="icon16 icomoon-icon-blocked"></span> Block</button>';
            $btn_pending='<button class="btn pending_checked" style="display:none" href="#"><span class="icon16 entypo-icon-time"></span> Pending</button>';
            $btn_restore='<button class="btn restore_checked" style="display:none" href="#"><span class="icon16 entypo-icon-back"></span> Restore</button>';
         }
         if($pagevals['status'] == 'approved'){
            $btn_block='<button class="btn block_checked" style="display:none" href="#"><span class="icon16 icomoon-icon-blocked"></span> Block</button>';
            $btn_approve='<button class="btn approve_checked" style="display:none" href="#"><span class="icon16 icomoon-icon-checkmark"></span> Approve</button>';
            $btn_restore='<button class="btn restore_checked" style="display:none" href="#"><span class="icon16 entypo-icon-back"></span> Restore</button>';
        }
         if($pagevals['status'] == 'active'){
            $btn_approve='<button class="btn approve_checked" style="display:none" href="#"><span class="icon16 icomoon-icon-checkmark"></span> Approve</button>';
            $btn_active='<button class="btn active_checked" style="display:none" href="#"><span class="icon16 icomoon-icon-arrow-up-7"></span> Active</button>';
            $btn_restore='<button class="btn restore_checked" style="display:none" href="#"><span class="icon16 entypo-icon-back"></span> Restore</button>';
        }
         if($pagevals['status'] == 'blocked'){
            $btn_approve='<button class="btn approve_checked" style="display:none" href="#"><span class="icon16 icomoon-icon-checkmark"></span> Approve</button>';
            $btn_block='<button class="btn block_checked" style="display:none" href="#"><span class="icon16 icomoon-icon-blocked"></span> Block</button>';
            $btn_restore='<button class="btn restore_checked" style="display:none" href="#"><span class="icon16 entypo-icon-back"></span> Restore</button>';
         }
         if($pagevals['status'] == 'deleted'){
             
            $btn_pending='<button class="btn pending_checked" style="display:none" href="#"><span class="icon16 entypo-icon-time"></span> Pending</button>';
            $btn_approve='<button class="btn approve_checked" style="display:none" href="#"><span class="icon16 icomoon-icon-checkmark"></span> Approve</button>';
            $btn_active='<button class="btn active_checked" style="display:none" href="#"><span class="icon16 icomoon-icon-arrow-up-7"></span> Active</button>';
            $btn_block='<button class="btn block_checked" style="display:none" href="#"><span class="icon16 icomoon-icon-blocked"></span> Block</button>';
            $btn_remove='<button class="btn remove_checked" style="display:none"  href="#"><span class="icon16 icomoon-icon-remove-2"></span> Delete</button>';
        }
        $control_button = $btn_pending.$btn_approve.$btn_active.$btn_block.$btn_restore.$btn_remove;
        echo $control_button;
   ?>
</div>

<div class="pagination" style="float: right; ">
  <ul>
      <li><span class=""><b><?php echo $pagevals['row_start'] ?></b>-<b><?php echo $pagevals['row_end'] ?></b> of <b><?php echo $pagevals['total_row'] ?></b></span></li>
     <?php if($pagevals['page_number'] != 1 && $pagevals['total_row'] != 0){ 
         $prev_page = $pagevals['page_number']-1;
         echo '<li><a href="?r=product/index&page_number='.$prev_page.'&status='.$pagevals['status'].'&search_string='.$pagevals['search_string'].'&hot_status='.$pagevals['hot_status'].'&category_id='.$pagevals['category_id'].'&brand='.$pagevals['brand'].'&color='.$pagevals['color'].'&size='.$pagevals['size'].'"><span class="icon12 minia-icon-arrow-left-3"></span></a></li>'; 
        }?>
    <?php if($pagevals['page_number'] != $pagevals['total_page'] && $pagevals['total_row'] !=0 ) {
        $next_page = $pagevals['page_number']+1;
        echo '<li><a href="?r=product/index&page_number='.$next_page.'&status='.$pagevals['status'].'&search_string='.$pagevals['search_string'].'&hot_status='.$pagevals['hot_status'].'&category_id='.$pagevals['category_id'].'&brand='.$pagevals['brand'].'&color='.$pagevals['color'].'&size='.$pagevals['size'].'"><span class="icon12 minia-icon-arrow-right-3"></span></a></li>'; 
        }?>
      
  </ul>
</div>
<div style="clear: both"></div>

<style type="">
    .filter-wrapper {
        margin-right: 7px;
        float: left;
        margin-bottom: 5px;
    }
    
    .filter-label {
        padding-left: 10px;
    }
    
</style>

<div class="row-fluid">

    <div class="span69">

        <div class="box">

            <div class="title">

                <h4 class="left">
                    <!--span class="icon16 brocco-icon-grid"></span--> 
                    <div class="filter-wrapper">
                        <label class="filter-label">Trạng thái</label>
                        <select id="status" style="opacity: 0;">
                            <option class="filter_label" value="pending">Pending</option>
                            <option class="filter_label" value="active">Active</option>
                            <option class="filter_label" value="approved">Approved</option>
                            <option class="filter_label" value="blocked">Blocked</option>
                            <option class="filter_label" value="deleted">Deleted</option>
                            <option class="filter_label" value="all">All</option>
                        </select>
                    </div>
                     
                    <div class="filter-wrapper">
                        <label class="filter-label">Danh mục</label>
                        <select name="category_id" id="category_id" style="opacity: 0;">
                            <option class="filter_label" value="all">All</option>
                            <?php
                                $categories = PrCategoryModel::model()->findAll('',array('id','name'));
                                if(count($categories) != 0){
                                   foreach($categories as $cate){
                                       echo '<option class="filter_label" value="'.$cate->id.'">'.ucfirst($cate->name).'</option>';
                                   }
                                }
                           ?>
                        </select>
                    </div>

                    <div class="filter-wrapper">
                        <label class="filter-label">Màu sắc</label>
                        <select name="color" id="color" style="opacity: 0;">
                            <option class="filter_label" value="all">All</option>
                            <?php
                            if(count($pagevals['filter_label']['color']) != 0){
                                foreach($pagevals['filter_label']['color'] as $key=> $value){
                                    echo '<option class="filter_label" value="'.$value.'">'.ucfirst($value).'</option>';
                                }
                            }
                            ?>
                        </select>
                    </div>

                    <div class="filter-wrapper">
                        <label class="filter-label">Size</label>
                        <select name="size" id="size" style="opacity: 0;">
                            <option class="filter_label" value="all">All</option>
                            <?php
                            if(count($pagevals['filter_label']['size']) != 0){
                                foreach($pagevals['filter_label']['size'] as $key=> $value){
                                    echo '<option class="filter_label" value="'.$value.'">'.ucfirst($value).'</option>';
                                }
                            }
                            ?>
                        </select>
                    </div>

                    <div class="filter-wrapper">
                        <label class="filter-label">Nhãn hiệu</label>
                        <select name="brand" id="brand" style="opacity: 0;">
                            <option class="filter_label" value="all">All</option>
                            <?php
                            if(count($pagevals['filter_label']['brand']) != 0){
                                foreach($pagevals['filter_label']['brand'] as $key=> $value){
                                    echo '<option class="filter_label" value="'.$value.'">'.ucfirst($value).'</option>';
                                }
                            }
                            ?>
                        </select>
                    </div>

                    <div class="filter-wrapper">
                        <label class="filter-label">Sản phẩm Hot</label>
                        <select name="hot_status" id="hot_status" style="opacity: 0;">
                            <option class="filter_label" value="all">All</option>
                            <option value="0">No</option>
                            <option value="1" selected="selected">Yes</option> 
                        </select>
                    </div>

                    <input style="margin-top: 24px; width: 380px; padding: 5px; float: left" type="text" id="search_box" name="search_string" value="" class="" placeholder="<?php if($pagevals['search_string'] != '') echo $pagevals['search_string']; else echo 'Search here ...'?>" >
                    
                    <span style="clear: left"></span>    
                    </h4>
                
                <a href="#" class="minimize" style="display: none;">Minimize</a>
                <div class="clearfix"></div>
            </div>
            
            <div class="content noPad">
                <table class="responsive table table-bordered" id="checkAll">
                    <thead>
                      <tr>
                        <th id="masterCh" class="ch">
                            <div class="checker" id="uniform-undefined">
                                <span><input type="checkbox" name="checkbox" value="all" class="styled" style="opacity: 0;"></span>
                            </div>
                        </th>
                        
                        <th>Tên Sản phẩm</th>
                        <th>Màu sắc</th>
                        <th>Nhãn hiệu</th>
                          <th>Giá</th>
                          <th>Khuyến mãi</th>
                        <th>Xử lý</th>
                      </tr>
                    </thead>
                    <tbody>
                        <?php
                          if(count($data)==0 || $data==null){
                              echo '<h3><label>Không có kết quả nào được tìm thấy.</label></h3>';
                          }else{  
                            $_tr = "</tr>";
                            $td_ = "<td style=vertical-align:middle>";$_td = "</td>";

                            $postlist = "";
                            foreach ($data as $post) {
                                
                               $postlist .='<tr id="row'.$post['id'].'"><td class="chChildren"><input type="checkbox" id="checkbox" value="'.$post['id'].'" class="styled"  /></td>'; 
                               $temp = explode(" ", $post["name"]);
                               $display_title = null;
                               $len = count($temp);
                               if($len >=7) {$limit=7;}
                               else {$limit = $len;}
                               for($i=0; $i<$limit;$i++) {
                                   $display_title .= $temp[$i] . " ";
                               }

                               $postlist .= '<td width="90"><a target="_blank" href="'.Yii::app()->baseUrl.'/'.$post['id'].'/'.$post['slug'].'.html" title = "'.$post["name"].'">'.trim($display_title).'</a>'.$_td;
                               $postlist .= $td_.$post["color"].$_td;
                               $postlist .= $td_.$post["brand"].$_td;
                               $postlist .= $td_.$post["price"].$_td;
                               $postlist .= $td_.$post["promotion"].$_td;
                               $postlist .= '<td id="td'.$post['id'].'" width="90" style="vertical-align:middle"><div class="controls center">';
                               
                               $post_pending ='<a href="#" title="Pending" id="'.$post['id'].'" style="display:block;float:left" class="pending"><span class="icon12 entypo-icon-time"></span></a>';
                               $post_approved ='<a href="#" title="Approve" id="'.$post['id'].'" style="display:block;float:left" class="approved"><span class="icon12  icomoon-icon-checkmark"></span></a>';
                               $post_active ='<a href="#" title="Active" id="'.$post['id'].'" style="display:block;float:left" class="active"><span class="icon12 icomoon-icon-arrow-up-7"></span></a>';
                               $post_block ='<a href="#" title="Block" id="'.$post['id'].'" style="display:block;float:left" class="block"><span class="icon12 icomoon-icon-blocked"></span></a>';   
                               $post_edit = '<a href="?r=product/edit&id='.$post['id'].'" style="display:block;float:left" title="Edit"><span class="icon12 icomoon-icon-pencil"></span></a>';
                               $post_restore ='<a href="#" title="Restore" id="'.$post['id'].'" style="display:block;float:left" class="restore"><span class="icon12 entypo-icon-back"></span></a>';
                               $post_remove ='<a href="#" id="'.$post['id'].'" style="display:block;float:left" class="remove" title="Remove" ><span class="icon12 icomoon-icon-remove"></span></a>';
                               
                               if($post['status'] == 'pending'){
                                  //$post_active ='<a href="#" style="display:none;float:left" title="Active" id="'.$post['id'].'" class="active"><span class="icon12 icomoon-icon-arrow-up-7"></span></a>';
                                  $post_block ='<a href="#" style="display:none;float:left" title="Block" id="'.$post['id'].'" class="block"><span class="icon12 icomoon-icon-blocked"></span></a>';   
                                  $post_pending ='<a href="#" style="display:none;float:left" title="Pending" id="'.$post['id'].'" class="pending"><span class="icon12 entypo-icon-time"></span></a>';
                                  $post_restore ='<a href="#" style="display:none;float:left" title="Restore" id="'.$post['id'].'" class="restore"><span class="icon12 entypo-icon-back"></span></a>';
                               }
                               if($post['status'] == 'approved'){
                                  $post_block ='<a href="#" style="display:none;float:left" title="Block" id="'.$post['id'].'" class="block"><span class="icon12 icomoon-icon-blocked"></span></a>';
                                  $post_approved ='<a href="#" style="display:none;float:left" title="Approve" id="'.$post['id'].'" class="approved"><span class="icon12  icomoon-icon-checkmark"></span></a>';
                                  $post_restore ='<a href="#" style="display:none;float:left" title="Restore" id="'.$post['id'].'" class="restore"><span class="icon12 entypo-icon-back"></span></a>';
                               }
                               if($post['status'] == 'active'){
                                   //$post_pending ='<a href="#" style="display:none;float:left" title="Pending" id="'.$post['id'].'" class="pending"><span class="icon12 entypo-icon-time"></span></a>';
                                   $post_approved ='<a href="#" style="display:none;float:left" title="Approve" id="'.$post['id'].'" class="approved"><span class="icon12  icomoon-icon-checkmark"></span></a>';
                                   $post_active ='<a href="#" style="display:none;float:left" title="Active" id="'.$post['id'].'" class="active"><span class="icon12 icomoon-icon-arrow-up-7"></span></a>';
                                   $post_restore ='<a href="#" style="display:none;float:left" title="Restore" id="'.$post['id'].'" class="restore"><span class="icon12 entypo-icon-back"></span></a>';
                               }
                               if($post['status'] == 'blocked'){
                                  $post_approved ='<a href="#" style="display:none;float:left" title="Approve" id="'.$post['id'].'" class="approved"><span class="icon12  icomoon-icon-checkmark"></span></a>';
                                  $post_block ='<a href="#" style="display:none;float:left" title="Block" id="'.$post['id'].'" class="block"><span class="icon12 icomoon-icon-blocked"></span></a>';
                                  $post_restore ='<a href="#" style="display:none;float:left" title="Restore" id="'.$post['id'].'" class="restore"><span class="icon12 entypo-icon-back"></span></a>';
                               }
                               if($post['status'] == 'deleted'){
                                   $post_edit = '<a href="?r=product/edit&id='.$post['id'].'" style="display:none;float:left" title="Edit"><span class="icon12 icomoon-icon-pencil"></span></a>';
                                   $post_pending ='<a href="#" style="display:none;float:left"  title="Pending" id="'.$post['id'].'" class="pending"><span class="icon12 entypo-icon-time"></span></a>';
                                   $post_approved ='<a href="#" style="display:none;float:left"  title="Approve" id="'.$post['id'].'" class="approved"><span class="icon12  icomoon-icon-checkmark"></span></a>';
                                   $post_active ='<a href="#" style="display:none;float:left"  title="Active" id="'.$post['id'].'" class="active"><span class="icon12 icomoon-icon-arrow-up-7"></span></a>';
                                   $post_block ='<a href="#" style="display:none;float:left"  title="Block" id="'.$post['id'].'" class="block"><span class="icon12 icomoon-icon-blocked"></span></a>';   
                                   $post_remove ='<a href="#" style="display:none;float:left" id="'.$post['id'].'" class="remove" title="Remove" ><span class="icon12 icomoon-icon-remove"></span></a>';
                               }
                               $postlist .= $post_pending.$post_approved.$post_active.$post_block.$post_restore.$post_edit.$post_remove;
                               $postlist .= '</div></td></tr>';
                            }

                             echo $postlist;
                             
                          }
                        ?>
                                      
                    </tbody>
                </table>
            </div>

        </div><!-- End .box -->

    </div><!-- End .span6 -->

</div>


<div style="float: left;">
   <button class="btn create_new" href="?r=product/create"><span class="icon16 cut-icon-plus"></span> Add</button>
   <?php
   /*
        $btn_pending='<button class="btn pending_checked" style="" href="#"><span class="icon16 entypo-icon-time"></span> Pending</button>';
        $btn_approve='<button class="btn approve_checked" href="#"><span class="icon16 icomoon-icon-checkmark"></span> Approve</button>';
        $btn_active='<button class="btn active_checked" href="#"><span class="icon16 icomoon-icon-arrow-up-7"></span> Active</button>';
        $btn_block='<button class="btn block_checked" href="#"><span class="icon16 icomoon-icon-blocked"></span> Block</button>';
        $btn_restore='<button class="btn restore_checked" href="#"><span class="icon16 entypo-icon-back"></span> Restore</button>';
        $btn_remove='<button class="btn remove_checked" href="#"><span class="icon16 icomoon-icon-remove-2"></span> Delete</button>';
   */     
         if($pagevals['status'] == 'pending'){
            //$post_active ='<a href="#" style="display:none;float:left" title="Active" id="'.$post['id'].'" class="active"><span class="icon12 icomoon-icon-arrow-up-7"></span></a>';
            $btn_block='<button class="btn block_checked" style="display:none" href="#"><span class="icon16 icomoon-icon-blocked"></span> Block</button>';
            $btn_pending='<button class="btn pending_checked" style="display:none" href="#"><span class="icon16 entypo-icon-time"></span> Pending</button>';
            $btn_restore='<button class="btn restore_checked" style="display:none" href="#"><span class="icon16 entypo-icon-back"></span> Restore</button>';
         }
         if($pagevals['status'] == 'approved'){
            $btn_block='<button class="btn block_checked" style="display:none" href="#"><span class="icon16 icomoon-icon-blocked"></span> Block</button>';
            $btn_approve='<button class="btn approve_checked" style="display:none" href="#"><span class="icon16 icomoon-icon-checkmark"></span> Approve</button>';
            $btn_restore='<button class="btn restore_checked" style="display:none" href="#"><span class="icon16 entypo-icon-back"></span> Restore</button>';
        }
         if($pagevals['status'] == 'active'){
            $btn_approve='<button class="btn approve_checked" style="display:none" href="#"><span class="icon16 icomoon-icon-checkmark"></span> Approve</button>';
            $btn_active='<button class="btn active_checked" style="display:none" href="#"><span class="icon16 icomoon-icon-arrow-up-7"></span> Active</button>';
            $btn_restore='<button class="btn restore_checked" style="display:none" href="#"><span class="icon16 entypo-icon-back"></span> Restore</button>';
        }
         if($pagevals['status'] == 'blocked'){
            $btn_approve='<button class="btn approve_checked" style="display:none" href="#"><span class="icon16 icomoon-icon-checkmark"></span> Approve</button>';
            $btn_block='<button class="btn block_checked" style="display:none" href="#"><span class="icon16 icomoon-icon-blocked"></span> Block</button>';
            $btn_restore='<button class="btn restore_checked" style="display:none" href="#"><span class="icon16 entypo-icon-back"></span> Restore</button>';
         }
         if($pagevals['status'] == 'deleted'){
             
            $btn_pending='<button class="btn pending_checked" style="display:none" href="#"><span class="icon16 entypo-icon-time"></span> Pending</button>';
            $btn_approve='<button class="btn approve_checked" style="display:none" href="#"><span class="icon16 icomoon-icon-checkmark"></span> Approve</button>';
            $btn_active='<button class="btn active_checked" style="display:none" href="#"><span class="icon16 icomoon-icon-arrow-up-7"></span> Active</button>';
            $btn_block='<button class="btn block_checked" style="display:none" href="#"><span class="icon16 icomoon-icon-blocked"></span> Block</button>';
            $btn_remove='<button class="btn remove_checked" style="display:none"  href="#"><span class="icon16 icomoon-icon-remove-2"></span> Delete</button>';
        }
        $control_button = $btn_pending.$btn_approve.$btn_active.$btn_block.$btn_restore.$btn_remove;
        echo $control_button;
   ?>
</div>

<div class="pagination" style="float: right; ">
  <ul>
      <li><span class=""><b><?php echo $pagevals['row_start'] ?></b>-<b><?php echo $pagevals['row_end'] ?></b> of <b><?php echo $pagevals['total_row'] ?></b></span></li>
    <?php if($pagevals['page_number'] != 1 && $pagevals['total_row'] != 0){ 
         $prev_page = $pagevals['page_number']-1;
         echo '<li><a href="?r=product/index&page_number='.$prev_page.'&status='.$pagevals['status'].'&search_string='.$pagevals['search_string'].'&hot_status='.$pagevals['hot_status'].'&category_id='.$pagevals['category_id'].'&brand='.$pagevals['brand'].'&color='.$pagevals['color'].'&size='.$pagevals['size'].'"><span class="icon12 minia-icon-arrow-left-3"></span></a></li>'; 
        }?>
    <?php if($pagevals['page_number'] != $pagevals['total_page'] && $pagevals['total_row'] !=0 ) {
        $next_page = $pagevals['page_number']+1;
        echo '<li><a href="?r=product/index&page_number='.$next_page.'&status='.$pagevals['status'].'&search_string='.$pagevals['search_string'].'&hot_status='.$pagevals['hot_status'].'&category_id='.$pagevals['category_id'].'&brand='.$pagevals['brand'].'&color='.$pagevals['color'].'&size='.$pagevals['size'].'"><span class="icon12 minia-icon-arrow-right-3"></span></a></li>'; 
        }?>
  </ul>
</div>
<div style="clear: both"></div>